<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "contract_log".
 *
 * @property int $id
 * @property int $cid
 * @property string $msg
 * @property string $data_before
 * @property string $data_after
 * @property int $type 1=审核;
 * @property int $aid
 * @property int $created_at
 */
class ContractLog extends \common\models\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'contract_log';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['cid', 'msg'], 'required'],
            [['cid', 'type', 'aid', 'created_at'], 'integer'],
            [['data_before', 'data_after'], 'string'],
            [['msg'], 'string', 'max' => 256],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'cid' => 'Cid',
            'msg' => 'Msg',
            'data_before' => 'Data Before',
            'data_after' => 'Data After',
            'type' => 'Type',
            'aid' => 'Aid',
            'created_at' => 'Created At',
        ];
    }
}
